import { createRouter, createWebHistory } from 'vue-router'
const routes = [
// 登录
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/login.vue')
  },

   {
    path: '/',
    name: 'layout',    
    component: () => import('../views/index.vue'),
    children:[
       // 首页
       {
        path: '/',
        name: 'home',        
        component: () => import('../views/home/home.vue'),
      },
        // 动环监控
      {
        path: '/control',
        name: 'layout',        
        component: () => import('../views/control/index.vue'),
        children:[
          {
            path: '/access',
            name: 'access',        
            component: () => import('../views/control/models/access.vue'),
          },
          {
            path: '/colder',
            name: 'colder',        
            component: () => import('../views/control/models/colder.vue'),
          },
          {
            path: '/distributing',
            name: 'distributing',        
            component: () => import('../views/control/models/distributing.vue'),
          },
          {
            path: '/environment',
            name: 'environment',        
            component: () => import('../views/control/models/environment.vue'),
          },
          {
            path: '/fireAlarm',
            name: 'fireAlarm',        
            component: () => import('../views/control/models/fireAlarm.vue'),
          },
          {
            path: '/mccasonics',
            name: 'mccasonics',        
            component: () => import('../views/control/models/mccasonics.vue'),
          },
          {
            path: '/vedio',
            name: 'vedio',        
            component: () => import('../views/control/models/vedio.vue'),
          }

          
        ]
      },
     
    
    ]
  }
  
]
const routerHistory = createWebHistory()
const router = createRouter({
  history: routerHistory,
  routes
})
export default router
